﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Compiled_Tests.RuleBase
{
    public class RuleBase : IRuleBase
    {
        IList<IExecutableRule> rules;

        public RuleBase()
        {
            rules = new List<IExecutableRule>();
        }

        public void AddRule(IExecutableRule rule)
        {
            rules.Add(rule);
        }

        public void Run(IBox box)
        {
            List<String> consequences = new List<String>();
            foreach (IExecutableRule rule in rules)
            {
                consequences.AddRange(rule.Run(box));
            }
        }

    }
}
